Operands That Have No Target
-
kOperandExpression
-
[(kExpressionAtoms)]
-
This operand allows for nesting of sub expressions within expressions. Add a child atom of type
kExpressionContainerAtomType
which contains the expression atoms. This expression is evaluated and is returned as the result of the operand.
-
kOperandConstant
-
[float theConstant]
-
The constant is returned as the result of the operand. Set the leaf data of this atom to the desired constant using a single precision floating point number.
-
kOperandKeyIsDown
-
[UInt16 modififerKeyFlags] Param2: [UInt8 lowerCaseAsciiCharacterCode]
-
This operand returns 1 if the key with the specified lower case ASCII character code is currently pressed, and 0 if it is not pressed. If you specify modifier keys, these keys must also be pressed for 1 to be returned. Note that if extra modifier keys are pressed, a positive indication will still be returned. The logic is "are these keys currently pressed?", not "are only these keys pressed?".
-
Additionally, you may determine if the mouse button is pressed.
-
You may pass 0 for modifier keys if you don't care about the modifier keys, and 0 for the ASCII character if you only care about the modifier keys.
The following flags may be used from
Events.h
. Note the mapping of the flags for Windows machines. Also, be warned that using the Control key may be a bad idea if you plan on using the movie on a Windows machine due to the fact that it is mapped to the Alt key, which is used by the Windows operating system.
-
btnState
-
The mouse button is pressed. Windows: the left mouse button is pressed.
-
cmdKey
-
The command key is pressed. Windows: the Ctrl key is pressed.
-
shiftKey
-
The Shift key is pressed.
-
alphaLock
-
The Caps Lock key is pressed.
-
optionKey
-
The option key is pressed. Under Windows: both the Ctrl and the Alt keys are pressed.
-
controlKey
-
The control key is pressed. Windows: the Alt key is pressed.
-
kOperandRandom
-
Param1: minimumValue Param2: maximumValue
-
A random number that is greater than or equal to the minimum value, and less than or equal to the maximum value is generated and returned as the result of this operand. You may use negative or positive numbers.
© 1999 Apple Computer, Inc.| Previous | Chapter Contents | Chapter Top | Next |